package com.zzyl.mapper;


import com.zzyl.entity.NursingProject;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface NursingProjectMapper {


    /**
     * 分页查询
     * @param name
     * @param status
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<NursingProjectVo> getByPage(@Param("name") String name,@Param("status") Integer status,

                                     @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    /**
     * 新增
     * @param nursingProject
     */
    void insert(NursingProject nursingProject);

    NursingProjectVo selectById(Long id);

    void update( NursingProject nursingProject);

    @Update("update nursing_project set status = #{status} where id = #{id}")
    void startOrStop(@Param("id") Long id,@Param("status") Integer status);

    @Delete("delete from nursing_project where id = #{id}")
    void deleteById(Long id);
}
